package models.connection;

import de.puc.defencetower.model.Map;
import org.codehaus.jackson.node.ObjectNode;
import play.libs.Json;
import views.MapCreator;
import views.html.tablemap;

/**
 * Created with IntelliJ IDEA.
 * User: chlemke
 * Date: 17.01.14
 * Time: 22:40
 * To change this template use File | Settings | File Templates.
 */
public class GameInitialisation {

    final Map mapdata;

    public GameInitialisation(Map mapdata) {
        this.mapdata = mapdata;
    }

    public ObjectNode getJson(){
        String sZ = MapCreator.create(mapdata);


        ObjectNode event = Json.newObject();
        event.put("kind", "GameInitialisation");
        event.put("mapdata", sZ);
        return event;
    }
}